package net.huashitong.scheduling.web;

import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import net.huashitong.Indicators.filter.IndicatorBreakdownFilter;
import net.huashitong.Indicators.service.IndicatorBreakdownService;
import net.huashitong.scheduling.databean.IndicatorSchedulingDatabean;
import net.huashitong.scheduling.entity.Accounting;
import net.huashitong.scheduling.entity.AreaNumber;
import net.huashitong.scheduling.entity.IndicatorScheduling;
import net.huashitong.scheduling.filter.IndicatorSchedulingFilter;
import net.huashitong.scheduling.filter.RatioFilter;
import net.huashitong.scheduling.service.AccountingService;
import net.huashitong.scheduling.service.AreaNumberService;
import net.huashitong.scheduling.service.IndicatorSchedulingService;
import net.huashitong.scheduling.utils.AnticipatoryComputingUtils;
import net.huashitong.scheduling.utils.AreaNameUtils;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.sirdc.modules.core.web.JsonBaseController;
import com.sirdc.modules.core.web.model.Message;
import com.sirdc.modules.utils.ObjectUtils;

@Controller
@RequestMapping("/app/indicatorScheduling/")
public class IndicatorSchedulingController extends JsonBaseController {

	@Autowired
	private IndicatorSchedulingService schedulingService;
	@Autowired
	private IndicatorBreakdownService indicatorBreakdownService;
	@Autowired
	private AreaNumberService areaNumberService;	
	@Autowired
	private AccountingService accountingService;
	@Override
	protected String getView(String arg0) {
		// TODO Auto-generated method stub
		return null;
	}
	/**
	 * 处理调度数据
	 * @param filter
	 * @return
	 */
	@ResponseBody
	@RequestMapping("/detailIndicator")
	public Message detailIndicator(@RequestBody IndicatorSchedulingFilter filter){
		List<IndicatorScheduling> indicatorSchedulings = filter.getLists();
		List<IndicatorScheduling> lists = schedulingService.queryByCategory(filter);
		for (IndicatorScheduling indicatorScheduling : indicatorSchedulings) {
			for (IndicatorScheduling indicatorSchedul : lists) {
				if(indicatorScheduling.getIndicatorName().equals(indicatorSchedul.getIndicatorName())){
					Double doubles = Double.parseDouble(indicatorScheduling.getRatio());
					String st = "";
					if(doubles != 0){
						DecimalFormat df=new DecimalFormat(".##");
						st=df.format(doubles);
						indicatorSchedul.setRatio(st);
					}else {
						indicatorSchedul.setRatio(indicatorScheduling.getRatio());
						st = indicatorSchedul.getRatio();
					}
					Double double1 = Double.parseDouble(st);
					Double double2 = Double.parseDouble(indicatorSchedul.getLastYearValue());
					if("0".equals(indicatorSchedul.getRatio())){
						indicatorSchedul.setYearPredict("0");
					}else {
						indicatorSchedul.setYearPredict(Double.toString(double2*(100+double1)/100));
					}
				}
			}
		}
		if("0".equals(lists.get(0).getRatio())){
			Double double3 = new Double(0);
			for (int j = 0; j < lists.size(); j++) {
				if(j == 0){
					continue;
				}
				double3 += Double.parseDouble(lists.get(j).getYearPredict());
			}
			
			lists.get(0).setYearPredict(Double.toString(double3));
			Double double4 = Double.parseDouble(lists.get(0).getLastYearValue());
			DecimalFormat df=new DecimalFormat(".##");
			String st=df.format((double3-double4)/double4*100);
			lists.get(0).setRatio(st);
		}else {
			Double double3 = Double.parseDouble(lists.get(0).getYearPredict());
			Double double4 = new Double(0);
			int k = 0;
			for (int i = 0; i < lists.size(); i++) {
				if(i == 0){
					continue;
				}else if("0".equals(lists.get(i).getRatio())){
					k = i;
				}else {
					double4 += Double.parseDouble(lists.get(i).getYearPredict());
				}
			}
			lists.get(k).setYearPredict(Double.toString(double3-double4));
			Double double5 = Double.parseDouble(lists.get(k).getLastYearValue());
			DecimalFormat df=new DecimalFormat(".##");
			String st=df.format(((double3-double4-double5)/double5*100));
			lists.get(k).setRatio(st);
		}
		List<IndicatorSchedulingDatabean> databeans = new ArrayList<IndicatorSchedulingDatabean>();
		for (IndicatorScheduling indicatorScheduling : lists) {
			IndicatorSchedulingDatabean databean = new IndicatorSchedulingDatabean();
			databean.setIndicatorName(indicatorScheduling.getIndicatorName());
			databean.setRatio(indicatorScheduling.getRatio());
			databeans.add(databean);
		}
		return coverMessage("200", "获取成功", databeans);
	}
	/**
	 * 查询指标数据
	 * @param filter
	 * @return
	 */
	@ResponseBody
	@RequestMapping("/queryValue")
	public Message queryValue(@RequestBody IndicatorSchedulingFilter filter){
		Map<String, Object> map = new HashMap<String, Object>();
		List<IndicatorScheduling> lists = schedulingService.queryByCategory(filter);
		List<IndicatorSchedulingDatabean> databeans = new ArrayList<IndicatorSchedulingDatabean>();
		for (IndicatorScheduling indicatorScheduling : lists) {
			IndicatorSchedulingDatabean databean = new IndicatorSchedulingDatabean();
			databean.setIndicatorName(indicatorScheduling.getIndicatorName());
			databean.setRatio(indicatorScheduling.getRatio());
			databeans.add(databean);
		}
		map.put("date", "2017年12月");
		map.put("lists", databeans);
		
		return coverMessage("200", "获取成功", map);
	}
	/**
	 * 查询血拼数据
	 * @param filter
	 * @return
	 */
	@ResponseBody
	@RequestMapping("/queryShopping")
	public Message queryShopping(@RequestBody IndicatorBreakdownFilter filter){
		List<String> industryNames = new ArrayList<String>();
		industryNames.add("地区生产总值");
		industryNames.add("第一产业");
		industryNames.add("第二产业");
		industryNames.add("第三产业");
		
		filter.setIndustryNames(industryNames);
		//filter = AreaNameUtils.getAreaName(filter);
		List<Map<String, Object>> maps = schedulingService.queryShopping(filter);
		return coverMessage("200", "数据获取成功",maps);
	}
	
	/**
	 * 获取血拼排名列表
	 * @return
	 */
	@ResponseBody
	@RequestMapping("/queryAreaNumberLis")
	public Message queryAreaNumberList(@RequestBody IndicatorBreakdownFilter filter){
		 List<AreaNumber> anList=areaNumberService.query();
		 System.out.println("anList="+anList.size());
		List<Map<String, Object>> list = new ArrayList<Map<String,Object>>();
	     for(AreaNumber am:anList){
	    	 if(!"JC".equals(am.getNumber())){
	    		 Map<String, Object> map2 = new HashMap<String, Object>();
	    		 map2.put("area", am.getName());
	    		 map2.put("number", am.getNumber());
	    		 list.add(map2);
	    	 }
	     }
	   return coverMessage("200", "获取成功", list);
	}
	
	
	@ResponseBody
	@RequestMapping("/queryDebugging")
	public Message queryDebugging(@RequestBody RatioFilter filter){
		List<Map<String, Object>> list = new ArrayList<Map<String,Object>>();
		Map<String, Object> maps = new HashMap<String, Object>();
	    DecimalFormat df=new DecimalFormat("#.##");
		Map<String, Object> map1 = new HashMap<String, Object>();
		List<Map<String, Object>> list1 = new ArrayList<Map<String,Object>>();
		Map<String, Object> map2 = new HashMap<String, Object>();
		List<Map<String, Object>> list2 = new ArrayList<Map<String,Object>>();
		Map<String, Object> map3 = new HashMap<String, Object>();
		List<Map<String, Object>> list3 = new ArrayList<Map<String,Object>>();
		Map<String, Object> map4 = new HashMap<String, Object>();
		List<Map<String, Object>> list4 = new ArrayList<Map<String,Object>>();
		AnticipatoryComputingUtils acu=new AnticipatoryComputingUtils();
		//第一产业
		double firstAZong=0.0;
		double firstBZong=0.0;
		double firstCZong=0.0;
		
		//第二产业
		double secondAZong=0.0;
		double secondbZong=0.0;
		double secondCZong=0.0;
		//第三产业
	    double thirdlyAZong=0.0;
		double thirdlyBZong=0.0;
		double thirdlyCZong=0.0;
		List<Accounting> alist=accountingService.queryAccountingByCurrentMonth("201712");
	    if(ObjectUtils.isNotBlank(alist)){
	    	for(Accounting a:alist){
	    		Map<String, Object> map8 = new HashMap<String, Object>();
	    		 map8.put("unit", "万元");
	    		 map8.put("date", a.getCurrentMonth());
	    		if("农林牧渔业".equals(a.getIndustryName())){
	    			if(ObjectUtils.isBlank(filter.getNlmyRotio())){
	    				filter.setNlmyRotio(a.getRatio());
	    			}
	    			double currentInvariant=acu.getCurrentInvariant(Double.parseDouble(a.getLastInvariant()), Double.parseDouble(filter.getNlmyRotio()));
	    			double currentPrice=acu.getCurrentPrice(currentInvariant, Double.parseDouble(a.getConversionValue()));
	    			map8.put("industryName", "农林牧渔业");
	    			map8.put("rotio", df.format(Double.parseDouble(filter.getNlmyRotio())));
	    			map8.put("cumulative",  df.format(currentPrice));
	    			map8.put("rotioName", "nlmyRotio");
	    			firstAZong=firstAZong+currentPrice;
	    			firstBZong=firstBZong+currentInvariant;
	    			firstCZong=firstCZong+Double.parseDouble(a.getLastInvariant());
	    			list2.add(map8);
	    		}else if("#农林牧渔服务业".equals(a.getIndustryName())){
	    			firstAZong=firstAZong-Double.parseDouble(a.getCurrentPriceValue());
	    			firstBZong=firstBZong-Double.parseDouble(a.getCurrentInvariant());
	    			firstCZong=firstCZong-Double.parseDouble(a.getLastInvariant());
	    			thirdlyAZong=thirdlyAZong+Double.parseDouble(a.getCurrentPriceValue());
	    			thirdlyBZong=thirdlyBZong+Double.parseDouble(a.getCurrentInvariant());
	    			thirdlyCZong=thirdlyCZong+Double.parseDouble(a.getLastInvariant());
	    		}else if("工业".equals(a.getIndustryName())){
	    			if(ObjectUtils.isBlank(filter.getGyRotio())){
	    				filter.setGyRotio(a.getRatio());
	    			}
	    			double currentInvariant=acu.getCurrentInvariant(Double.parseDouble(a.getLastInvariant()), Double.parseDouble(filter.getGyRotio()));
	    			double currentPrice=acu.getCurrentPrice(currentInvariant, Double.parseDouble(a.getConversionValue()));
	    			
	    			map8.put("industryName", "工业");
	    			map8.put("rotio",df.format(Double.parseDouble(filter.getGyRotio())));
	    			map8.put("cumulative", df.format(currentPrice));
	    			map8.put("rotioName", "gyRotio");
	    			list3.add(map8);
	    			secondAZong=secondAZong+currentPrice;
	    			secondbZong= secondbZong+currentInvariant;
	    			secondCZong=secondCZong+Double.parseDouble(a.getLastInvariant());
	    		}else if("#开采辅助活动".equals(a.getIndustryName())){
	    			secondAZong=secondAZong-Double.parseDouble(a.getCurrentPriceValue());
	    			secondbZong= secondbZong-Double.parseDouble(a.getCurrentInvariant());
	    			secondCZong=secondCZong-Double.parseDouble(a.getLastInvariant());
	    			thirdlyAZong=thirdlyAZong+Double.parseDouble(a.getCurrentPriceValue());
	    			thirdlyBZong=thirdlyBZong+Double.parseDouble(a.getCurrentInvariant());
	    			thirdlyCZong=thirdlyCZong+Double.parseDouble(a.getLastInvariant());
	    		}else if("#金属制品、机械和设备修理业".equals(a.getIndustryName())){
	    			secondAZong=secondAZong-Double.parseDouble(a.getCurrentPriceValue());
	    			secondbZong= secondbZong-Double.parseDouble(a.getCurrentInvariant());
	    			secondCZong=secondCZong-Double.parseDouble(a.getLastInvariant());
	    			thirdlyAZong=thirdlyAZong+Double.parseDouble(a.getCurrentPriceValue());
	    			thirdlyBZong=thirdlyBZong+Double.parseDouble(a.getCurrentInvariant());
	    			thirdlyCZong=thirdlyCZong+Double.parseDouble(a.getLastInvariant());
	    		}else if("建筑业".equals(a.getIndustryName())){
	    			if(ObjectUtils.isBlank(filter.getJzRotio())){
	    				filter.setJzRotio(a.getRatio());
	    			}
	    			double currentInvariant=acu.getCurrentInvariant(Double.parseDouble(a.getLastInvariant()), Double.parseDouble(filter.getJzRotio()));
	    			double currentPrice=acu.getCurrentPrice(currentInvariant, Double.parseDouble(a.getConversionValue()));
	    			System.out.println("currentInvariant"+currentInvariant);
	    			map8.put("industryName", "建筑业");
	    			map8.put("rotio",df.format(Double.parseDouble(filter.getJzRotio())));
	    			map8.put("cumulative", df.format(currentPrice));
	    			map8.put("rotioName", "jzRotio");
	    			list3.add(map8);
	    			secondAZong=secondAZong+currentPrice;
	    			secondbZong= secondbZong+currentInvariant;
	    			secondCZong=secondCZong+Double.parseDouble(a.getLastInvariant());
	    		}else if("交通运输、仓储和邮政业".equals(a.getIndustryName())){
	    			if(ObjectUtils.isBlank(filter.getJtcRotio())){
	    				filter.setJtcRotio(a.getRatio());
	    			}
	    			double currentInvariant=acu.getCurrentInvariant(Double.parseDouble(a.getLastInvariant()), Double.parseDouble(filter.getJtcRotio()));
	    			double currentPrice=acu.getCurrentPrice(currentInvariant, Double.parseDouble(a.getConversionValue()));
	    			map8.put("industryName", "交通运输、仓储和邮政业");
	    			map8.put("rotio",df.format(Double.parseDouble(filter.getJtcRotio())));
	    			map8.put("cumulative", df.format(currentPrice));
	    			map8.put("rotioName", "jtcRotio");
	    			list4.add(map8);
	    			thirdlyAZong=thirdlyAZong+currentPrice;
	    			thirdlyBZong=thirdlyBZong+currentInvariant;
	    			thirdlyCZong=thirdlyCZong+Double.parseDouble(a.getLastInvariant());
	    		}else if("批发和零售业".equals(a.getIndustryName())){
	    			if(ObjectUtils.isBlank(filter.getPcRotio())){
	    				filter.setPcRotio(a.getRatio());
	    			}
	    			double currentInvariant=acu.getCurrentInvariant(Double.parseDouble(a.getLastInvariant()), Double.parseDouble(filter.getPcRotio()));
	    			double currentPrice=acu.getCurrentPrice(currentInvariant, Double.parseDouble(a.getConversionValue()));
	    			map8.put("industryName", "批发和零售业");
	    			map8.put("rotio",df.format(Double.parseDouble(filter.getPcRotio())));
	    			map8.put("cumulative", df.format(currentPrice));
	    			map8.put("rotioName", "pcRotio");
	    			list4.add(map8);
	    			thirdlyAZong=thirdlyAZong+currentPrice;
	    			thirdlyBZong=thirdlyBZong+currentInvariant;
	    			thirdlyCZong=thirdlyCZong+Double.parseDouble(a.getLastInvariant());
	    		}else if("住宿和餐饮业".equals(a.getIndustryName())){
	    			if(ObjectUtils.isBlank(filter.getZcRotio())){
	    				filter.setZcRotio(a.getRatio());
	    			}
	    			double currentInvariant=acu.getCurrentInvariant(Double.parseDouble(a.getLastInvariant()), Double.parseDouble(filter.getZcRotio()));
	    			double currentPrice=acu.getCurrentPrice(currentInvariant, Double.parseDouble(a.getConversionValue()));
	    			map8.put("industryName", "住宿和餐饮业");
	    			map8.put("rotio",df.format(Double.parseDouble(filter.getZcRotio())));
	    			map8.put("cumulative", df.format(currentPrice));
	    			map8.put("rotioName", "zcRotio");
	    			list4.add(map8);
	    			thirdlyAZong=thirdlyAZong+currentPrice;
	    			thirdlyBZong=thirdlyBZong+currentInvariant;
	    			thirdlyCZong=thirdlyCZong+Double.parseDouble(a.getLastInvariant());
	    		}else if("金融业".equals(a.getIndustryName())){
	    			if(ObjectUtils.isBlank(filter.getJrRotio())){
	    				filter.setJrRotio(a.getRatio());
	    			}
	    			double currentInvariant=acu.getCurrentInvariant(Double.parseDouble(a.getLastInvariant()), Double.parseDouble(filter.getJrRotio()));
	    			double currentPrice=acu.getCurrentPrice(currentInvariant, Double.parseDouble(a.getConversionValue()));
	    			map8.put("industryName", "金融业");
	    			map8.put("rotio",df.format(Double.parseDouble(filter.getJrRotio())));
	    			map8.put("cumulative", df.format(currentPrice));
	    			map8.put("rotioName", "jrRotio");
	    			list4.add(map8);
	    			thirdlyAZong=thirdlyAZong+currentPrice;
	    			thirdlyBZong=thirdlyBZong+currentInvariant;
	    			thirdlyCZong=thirdlyCZong+Double.parseDouble(a.getLastInvariant());
	    		}else if("房地产业(K门类)".equals(a.getIndustryName())){
	    			if(ObjectUtils.isBlank(filter.getFcRotio())){
	    				filter.setFcRotio(a.getRatio());
	    			}
	    			double currentInvariant=acu.getCurrentInvariant(Double.parseDouble(a.getLastInvariant()), Double.parseDouble(filter.getFcRotio()));
	    			double currentPrice=acu.getCurrentPrice(currentInvariant, Double.parseDouble(a.getConversionValue()));
	    			map8.put("industryName", "房地产业(K门类)");
	    			map8.put("rotio",df.format(Double.parseDouble(filter.getFcRotio())));
	    			map8.put("cumulative", df.format(currentPrice));
	    			map8.put("rotioName", "fcRotio");
	    			list4.add(map8);
	    			thirdlyAZong=thirdlyAZong+currentPrice;
	    			thirdlyBZong=thirdlyBZong+currentInvariant;
	    			thirdlyCZong=thirdlyCZong+Double.parseDouble(a.getLastInvariant());
	    		}else if("自有房地产经营活动".equals(a.getIndustryName())){
	    			if(ObjectUtils.isBlank(filter.getJmRotio())){
	    				filter.setJmRotio(a.getRatio());
	    			}
	    			double currentInvariant=acu.getCurrentInvariant(Double.parseDouble(a.getLastInvariant()), Double.parseDouble(filter.getJmRotio()));
	    			double currentPrice=acu.getCurrentPrice(currentInvariant, Double.parseDouble(a.getConversionValue()));
	    			map8.put("industryName", "自有房地产经营活动");
	    			map8.put("rotio",df.format(Double.parseDouble(filter.getJmRotio())));
	    			map8.put("cumulative", df.format(currentPrice));
	    			map8.put("rotioName", "jmRotio");
	    			list4.add(map8);
	    			thirdlyAZong=thirdlyAZong+currentPrice;
	    			thirdlyBZong=thirdlyBZong+currentInvariant;
	    			thirdlyCZong=thirdlyCZong+Double.parseDouble(a.getLastInvariant());
	    		}else if("营利性服务业".equals(a.getIndustryName())){
	    			if(ObjectUtils.isBlank(filter.getYlRotion())){
	    				filter.setYlRotion(a.getRatio());
	    			}
	    			double currentInvariant=acu.getCurrentInvariant(Double.parseDouble(a.getLastInvariant()), Double.parseDouble(filter.getYlRotion()));
	    			double currentPrice=acu.getCurrentPrice(currentInvariant, Double.parseDouble(a.getConversionValue()));
	    			map8.put("industryName", "营利性服务业");
	    			map8.put("rotio",df.format(Double.parseDouble(filter.getYlRotion())));
	    			map8.put("cumulative", df.format(currentPrice));
	    			map8.put("rotioName", "ylRotion");
	    			list4.add(map8);
	    			thirdlyAZong=thirdlyAZong+currentPrice;
	    			thirdlyBZong=thirdlyBZong+currentInvariant;
	    			thirdlyCZong=thirdlyCZong+Double.parseDouble(a.getLastInvariant());
	    		}else if("非营利性服务业".equals(a.getIndustryName())){
	    			if(ObjectUtils.isBlank(filter.getFlyRotion())){
	    				filter.setFlyRotion(a.getRatio());
	    			}
	    			double currentInvariant=acu.getCurrentInvariant(Double.parseDouble(a.getLastInvariant()), Double.parseDouble(filter.getFlyRotion()));
	    			double currentPrice=acu.getCurrentPrice(currentInvariant, Double.parseDouble(a.getConversionValue()));
	    			map8.put("industryName", "非营利性服务业");
	    			map8.put("rotio",df.format(Double.parseDouble(filter.getFlyRotion())));
	    			map8.put("cumulative", df.format(currentPrice));
	    			map8.put("rotioName", "flyRotion");
	    			list4.add(map8);
	    			thirdlyAZong=thirdlyAZong+currentPrice;
	    			thirdlyBZong=thirdlyBZong+currentInvariant;
	    			thirdlyCZong=thirdlyCZong+Double.parseDouble(a.getLastInvariant());
	    		}
	    	}
	    }
	    //第一产业
	    acu.setFirstCumulative(firstAZong);
	    acu.setFirstRotio(acu.getRotioCalculate(firstBZong, firstCZong));
	    //第二产业
	    acu.setSecondCumulative(secondAZong);
	    acu.setSecondRotio(acu.getRotioCalculate(secondbZong,secondCZong));
	    //第三产业
	    acu.setThirdlyCumulative(thirdlyAZong);
	    acu.setThirdlyRotio(acu.getRotioCalculate(thirdlyBZong,thirdlyCZong));
	    //GDP
	    acu.setGdpRotio(acu.getRotioCalculate(firstBZong+secondbZong+thirdlyBZong,firstCZong+secondCZong+thirdlyCZong));
		map1.put("title", "GDP调度表");
		map1.put("unit", "万元");
		map1.put("type","1");
		map1.put("industryName", "GDP");
		map1.put("cumulative",df.format(acu.getGdpCumulative()));
		map1.put("rotio",df.format(acu.getGdpRotio()));
		Map<String, Object> map5 = new HashMap<String, Object>();
		map5.put("industryName", "一产");
		map5.put("unit", "万元");
		map5.put("cumulative",df.format(acu.getFirstCumulative()));
		map5.put("rotio",df.format(acu.getFirstRotio()));
		
		Map<String, Object> map6 = new HashMap<String, Object>();
		map6.put("industryName", "二产");
		map6.put("cumulative",df.format(acu.getSecondCumulative()));
		map6.put("rotio",df.format(acu.getSecondRotio()));
		map6.put("unit", "万元");
		Map<String, Object> map7 = new HashMap<String, Object>();
		map7.put("industryName", "三产");
		map7.put("cumulative",df.format(acu.getThirdlyCumulative()));
		map7.put("rotio",df.format(acu.getThirdlyRotio()));
		map7.put("unit", "万元");
		list1.add(map5);
		list1.add(map6);
		list1.add(map7);
		map1.put("lists", list1);
	    
		
		map2.put("title", "一产调度表");
		map2.put("type","2");
		map2.put("industryName", "一产");
		map2.put("unit", "万元");
		map2.put("cumulative",df.format(acu.getFirstCumulative()));
		map2.put("rotio",df.format(acu.getFirstRotio()));
		map2.put("lists", list2);
		
		map3.put("title", "二产调度表");
		map3.put("type","3");
		map3.put("industryName", "二产");
		map3.put("unit", "万元");
		map3.put("cumulative",df.format(acu.getSecondCumulative()));
		map3.put("rotio",df.format(acu.getSecondRotio()));
		map3.put("lists", list3);
		
		map4.put("title", "三产调度表");
		map4.put("type","4");
		map4.put("industryName", "三产");
		map4.put("unit", "万元");
		map4.put("cumulative",df.format(acu.getThirdlyCumulative()));
		map4.put("rotio",df.format(acu.getThirdlyRotio()));
		map4.put("lists", list4);
		list.add(map1);
		list.add(map2);
		list.add(map3);
		list.add(map4);
		
		maps.put("title", "一、二、三产业分行业分析调度");
		maps.put("unit", "万元");
	    maps.put("data", list);
	    maps.put("date","2017年12月");
		return coverMessage("200", "获取成功", maps);
	}
	
}
